using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DisturbTimeSpan : GeneratedMessageLite<DisturbTimeSpan, DisturbTimeSpan.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DisturbTimeSpan, DisturbTimeSpan.Builder>
		{
			private bool resultIsReadOnly;
			private DisturbTimeSpan result;
			protected override DisturbTimeSpan.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DisturbTimeSpan MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DisturbTimeSpan DefaultInstanceForType
			{
				get
				{
					return DisturbTimeSpan.DefaultInstance;
				}
			}
			public uint BeginTime
			{
				get
				{
					return this.result.BeginTime;
				}
				set
				{
					this.SetBeginTime(value);
				}
			}
			public uint EndTime
			{
				get
				{
					return this.result.EndTime;
				}
				set
				{
					this.SetEndTime(value);
				}
			}
			public Builder()
			{
				this.result = DisturbTimeSpan.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DisturbTimeSpan cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DisturbTimeSpan PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DisturbTimeSpan other = this.result;
					this.result = new DisturbTimeSpan();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DisturbTimeSpan.Builder Clear()
			{
				this.result = DisturbTimeSpan.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DisturbTimeSpan.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DisturbTimeSpan.Builder(this.result);
				}
				return new DisturbTimeSpan.Builder().MergeFrom(this.result);
			}
			public override DisturbTimeSpan BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DisturbTimeSpan.Builder MergeFrom(IMessageLite other)
			{
				if (other is DisturbTimeSpan)
				{
					return this.MergeFrom((DisturbTimeSpan)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DisturbTimeSpan.Builder MergeFrom(DisturbTimeSpan other)
			{
				return this;
			}
			public override DisturbTimeSpan.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DisturbTimeSpan.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DisturbTimeSpan._disturbTimeSpanFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DisturbTimeSpan._disturbTimeSpanFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasEndTime = input.ReadUInt32(ref this.result.endTime_);
						}
					}
					else
					{
						this.result.hasBeginTime = input.ReadUInt32(ref this.result.beginTime_);
					}
				}
				return this;
			}
			public DisturbTimeSpan.Builder SetBeginTime(uint value)
			{
				this.PrepareBuilder();
				this.result.hasBeginTime = true;
				this.result.beginTime_ = value;
				return this;
			}
			public DisturbTimeSpan.Builder ClearBeginTime()
			{
				this.PrepareBuilder();
				this.result.hasBeginTime = false;
				this.result.beginTime_ = 0u;
				return this;
			}
			public DisturbTimeSpan.Builder SetEndTime(uint value)
			{
				this.PrepareBuilder();
				this.result.hasEndTime = true;
				this.result.endTime_ = value;
				return this;
			}
			public DisturbTimeSpan.Builder ClearEndTime()
			{
				this.PrepareBuilder();
				this.result.hasEndTime = false;
				this.result.endTime_ = 0u;
				return this;
			}
		}
		public const int BeginTimeFieldNumber = 1;
		public const int EndTimeFieldNumber = 2;
		private static readonly DisturbTimeSpan defaultInstance;
		private static readonly string[] _disturbTimeSpanFieldNames;
		private static readonly uint[] _disturbTimeSpanFieldTags;
		private bool hasBeginTime;
		private uint beginTime_;
		private bool hasEndTime;
		private uint endTime_;
		private int memoizedSerializedSize = -1;
		public static DisturbTimeSpan DefaultInstance
		{
			get
			{
				return DisturbTimeSpan.defaultInstance;
			}
		}
		public override DisturbTimeSpan DefaultInstanceForType
		{
			get
			{
				return DisturbTimeSpan.DefaultInstance;
			}
		}
		protected override DisturbTimeSpan ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint BeginTime
		{
			get
			{
				return this.beginTime_;
			}
		}
		public uint EndTime
		{
			get
			{
				return this.endTime_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBeginTime && this.hasEndTime;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBeginTime)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.BeginTime);
				}
				if (this.hasEndTime)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.EndTime);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DisturbTimeSpan()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] disturbTimeSpanFieldNames = DisturbTimeSpan._disturbTimeSpanFieldNames;
			if (this.hasBeginTime)
			{
				output.WriteUInt32(1, disturbTimeSpanFieldNames[0], this.BeginTime);
			}
			if (this.hasEndTime)
			{
				output.WriteUInt32(2, disturbTimeSpanFieldNames[1], this.EndTime);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBeginTime)
			{
				num ^= this.beginTime_.GetHashCode();
			}
			if (this.hasEndTime)
			{
				num ^= this.endTime_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DisturbTimeSpan disturbTimeSpan = object_0 as DisturbTimeSpan;
			return disturbTimeSpan != null && (this.hasBeginTime == disturbTimeSpan.hasBeginTime && (!this.hasBeginTime || this.beginTime_.Equals(disturbTimeSpan.beginTime_))) && (this.hasEndTime == disturbTimeSpan.hasEndTime && (!this.hasEndTime || this.endTime_.Equals(disturbTimeSpan.endTime_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DisturbTimeSpan, DisturbTimeSpan.Builder>.PrintField("BeginTime", this.hasBeginTime, this.beginTime_, writer);
			GeneratedMessageLite<DisturbTimeSpan, DisturbTimeSpan.Builder>.PrintField("EndTime", this.hasEndTime, this.endTime_, writer);
		}
		public static DisturbTimeSpan ParseFrom(byte[] data)
		{
			return DisturbTimeSpan.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DisturbTimeSpan MakeReadOnly()
		{
			return this;
		}
		public static DisturbTimeSpan.Builder CreateBuilder()
		{
			return new DisturbTimeSpan.Builder();
		}
		public override DisturbTimeSpan.Builder ToBuilder()
		{
			return DisturbTimeSpan.CreateBuilder(this);
		}
		public override DisturbTimeSpan.Builder CreateBuilderForType()
		{
			return new DisturbTimeSpan.Builder();
		}
		public static DisturbTimeSpan.Builder CreateBuilder(DisturbTimeSpan prototype)
		{
			return new DisturbTimeSpan.Builder(prototype);
		}
		static DisturbTimeSpan()
		{
			DisturbTimeSpan.defaultInstance = new DisturbTimeSpan().MakeReadOnly();
			DisturbTimeSpan._disturbTimeSpanFieldNames = new string[]
			{
				"BeginTime",
				"EndTime"
			};
			DisturbTimeSpan._disturbTimeSpanFieldTags = new uint[]
			{
				8u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.DisturbTimeSpan.Descriptor, null);
		}
	}
}
